<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/commons/taglibs.jsp"%>
<!-- Bootstrap-->
<link rel="stylesheet" href="${basePath}/statics/thirdparty/bootstrap/css/bootstrap.min.css">

<link href="${basePath}/statics/thirdparty/treeTable/themes/vsStyle/treeTable.min.css"
      rel="stylesheet" type="text/css" />
<!-- Font Awesome -->
<link rel="stylesheet" href="${basePath}/statics/thirdparty/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="${basePath}/statics/thirdparty/ionicons/css/ionicons.min.css">


<!-- 加载jquery -->
<script type="text/javascript" src="${basePath}/statics/thirdparty/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/statics/thirdparty/bootstrap/js/bootstrap.min.js"></script>
<script  type="text/javascript"  src="${basePath}/statics/thirdparty/treeTable/jquery.treeTable.min.js"></script>

<!-- chosen-->
<link href="${basePath}/statics/thirdparty/chosen/chosen.css" type="text/css" rel="stylesheet"/>

<!--easyui datagrid -->
<script type="text/javascript" src="${basePath}/statics/thirdparty/jquery-easyui/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="${basePath}/statics/thirdparty/jquery-easyui/themes/metro/datagrid.css" />
<link rel="stylesheet" type="text/css" href="${basePath}/statics/thirdparty/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${basePath}/statics/thirdparty/jquery-easyui/themes/icon.css">

<!-- layer-->
<script type="text/javascript" src="${basePath}/statics/modules/sys/index/js/reloadAllByAll.js"></script>
<script src="${basePath}/statics/thirdparty/layer/layer.js"  type="text/javascript"></script>
<script type="text/javascript" src="${basePath}/statics/thirdparty/jquery-addclear/addclear.js"></script>
<script type="text/javascript" src="${basePath}/statics/commons/js/common.js"></script>
<script type="text/javascript" src="${basePath}/statics/commons/js/myEditCell.js"></script>
<script type="text/javascript" src="${basePath}/statics/commons/js/my_valdate_box.js"></script>
<!-- chosen js -->
<script type="text/javascript" src="${basePath}/statics/thirdparty/chosen/chosen.jquery.js"></script>

<jsp:include page="common.jsp"></jsp:include>

<!--skin-->
<!--皮肤样式-->
<link skin="orange" href="${basePath}/statics/commons/theme/default/css/skin/skin-orange.css" rel="stylesheet" type="text/css" disabled="disabled">
<link skin="blue" href="${basePath}/statics/commons/theme/default/css/skin/skin-default.css" rel="stylesheet" type="text/css">
<link skin="green" href="${basePath}/statics/commons/theme/default/css/skin/skin-green.css" rel="stylesheet" type="text/css" disabled="disabled">
<link
        href="${basePath}/statics/commons/css/common.css"
        type="text/css" rel="stylesheet" />

<script>
    $(function () {
        if($("#pagination").length==0)
            return;
        if (window.autoDatagridHeight)
            window.datagridHeight="auto";
        else
            window.datagridHeight=$(".submitdata").parent().height() - $(".submitdata").outerHeight(true)-20;
        window.dg_cm_pp={
            height: window.datagridHeight,
            striped: true,
            rownumbers:true,
            fitColumns:true,
            pagination:true,
            pageList:[10,20,30],
            onLoadSuccess:function(){
                $(window).trigger("resize");
            }
        };

        function getTopCookie(name) {
            var arr=window.top.document.cookie.split("; ");
            var i=0;
            for(i=0; i<arr.length;i++)
            {
                arr2=arr[i].split("=");
                if(arr2[0]==name)
                {
                    return arr2[1];
                }
            }
            return null;
        }
        function  changeSkin(skin) {
            if(skin!=null){
                $("link[skin!='']").each(function () {
                    var s = $(this).attr("skin");
                    if(s!= 'undefined' && s!=undefined){
                        $(this).attr("disabled","disabled");
                    }
                });
                $("link[skin='"+skin+"']").removeAttr("disabled");

                //改变frame的skin
                var iFrames = window.frames;
                for (var i=0;i<iFrames.length;i++) {
                    $(iFrames[i].document).find('link[skin!=""]').each(function () {
                        var s = $(this).attr("skin");
                        if(s!= 'undefined' && s!=undefined){
                            $(this).attr("disabled","disabled");
                        }
                    });
                    $(iFrames[i].document).find("link[skin='"+skin+"']").removeAttr("disabled");
                }
            }


        }
        changeSkin(changeSkin(getTopCookie("skin")));
    });

    $(window).resize(function() {
        $('#pagination').datagrid('resize',{
            height: window.datagridHeigh
        });
    });
</script>
